<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <div  v-for="item in list" :key="item.id">
            <div class="view">
                
                <p>{{item.name}}   </p>
              
            </div>
        </div>
    </div>

    <script>


       new Vue({
        el:"#app",
        data() {
            return {
                  // 定义模板中要使用的数据
                  list: [
                    { id: 100, name: "吃饭" },
                    { id: 201, name: "睡觉"},
                    { id: 103, name: "打豆豆" },
                ],
            }
        },
       })

    </script>
</body>
</html>